package com.filedemo.dao;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.filedemo.entity.Files;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Service;

import java.util.List;

@Mapper
public interface FilesMapper extends BaseMapper<Files> {


    @Select("select Time from files where UUID=#{uuid}")
    String queryFileByUUID(String uuid);


    @Select("select originalName,Type,Size,Time,cataLog from files where UUID=#{uuid}")
    Files queryFileJSON(String uuid);

    @Select("select * from files order by id desc")
    List<Files> queryAllFiles();
}
